package edu.fdzc.system.mapper;

import edu.fdzc.system.entity.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QuestionMapper {
    void insert(Question question);

    void updateById(Question question);

    void deleteById(Integer id);

    Question selectById(Integer id);

    List<Question> selectAll(Question question);


    @Select("select * from question where course_id = #{courseId} and type_id = #{typeId}")
    List<Question> selectByCouserIdAndTypeId(@Param("courseId") Integer courseId, @Param("typeId") Integer typeId);
}
